package com.scse.bms.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.scse.bms.entity.RecommendDO;
import com.scse.bms.mapper.RecommendMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Title: RecommendServiceImpl
 * @Author: 吴赠禹
 * @Date: 2021/2/22 20:18
 * @Version: 1.0
 * @Description: recommendService实现类，继承ServiceImpl，可以直接使用
 */

@Service
@Transactional(rollbackFor = Exception.class)
public class RecommendServiceImpl extends ServiceImpl<RecommendMapper, RecommendDO> implements RecommendService{


    @Autowired
    private RecommendMapper recommendMapper;

    @Override
    public int remove(Integer bookId) {
        return recommendMapper.deleteRecommend(bookId);
    }
}
